#include <QCoreApplication>
#include <math.h>
#include <iostream>
int main (){
using namespace std;
    int j,i,N,A[10];
    cout << "N=" ;
    cin >>N;
    for (i=1;i<=N;i++)
    {cout <<"A["<<i<<"]="; cin >>A[i];cout<<endl;}
     j=1;
      for (i=1;i<=N;i++)
      {
      if ((A[i]%2)== 0) {
      A[j]=A[i];
      j++;
      }}
      N=j-1;
    cout <<"Otvet" << endl;
    for (i=1;i<=N;i++)
       {
       cout<<A[i]<<" ";
       }
    return 0;
}
